<?php /* Smarty version 2.6.14, created on 2014-11-18 11:30:52
         compiled from members.index.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'html_options', 'members.index.html', 85, false),array('modifier', 'date_format', 'members.index.html', 147, false),)), $this); ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "header.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<form action="<?php echo $this->_tpl_vars['formAction']; ?>
" method="POST" <?php if ($this->_tpl_vars['is_validator']): ?> id="adminform" onsubmit="return Validator.Validate(this)" <?php endif; ?>>
<script language="javascript" src="<?php echo @BASEURI; ?>
public/js/ui.datetimepicker.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo @BASEURI; ?>
public/css/ui.datepicker.css"/>
<style type="text/css">
table div{
	float:left;
	margin:3px auto 6px auto;
	padding:0px;
}
#search tr{
	line-height:120%;
	margin:0px;
	padding:0px;
}
</style>
<script language="javascript" type="text/javascript">
var server	=	'<?php echo $this->_tpl_vars['servers']; ?>
';  // 服务器信息数组
var gcode = '<?php echo $this->_tpl_vars['search']['game_id']; ?>
';      // 当前选中游戏
var sel_server = "<?php echo $this->_tpl_vars['search']['server_id']; ?>
"; // 当前选中游戏服务区
var gsname;
$(document).ready(function(){
    server = eval('('+server+')');
	gsname = document.getElementById("server");
    channels = eval('('+channels+')');
	user_channel = document.getElementById("user_channel");
	if(gcode != ''){
		gsname.options.length = 0;
		gsname.options.add(new Option("<?php echo $this->_tpl_vars['systemLang']['choose']; ?>
",""));

		for (i in server[gcode]){
			var s	=	new Option(server[gcode][i],i);
			if(i == sel_server)
			s.selected = 'selected';
			gsname.options.add(s);
		}
	}
});

function unionChange(v){
    	union_id = v;
		user_channel.options.length = 0;
		user_channel.options.add(new Option("<?php echo $this->_tpl_vars['systemLang']['choose']; ?>
",""));
		for (var i in channels[union_id]){
			user_channel.options.add(new Option(channels[union_id][i],i));
		}
		if(! channels[union_id]){
			user_channel.options.add(new Option("<?php echo $this->_tpl_vars['systemLang']['choose']; ?>
",""));
			return false;
		}
}
function gameChange(v){
    	gcode = v;
		gsname.options.length = 0;
		gsname.options.add(new Option("<?php echo $this->_tpl_vars['systemLang']['choose']; ?>
",""));
		for (var i in server[gcode]){
			gsname.options.add(new Option(server[gcode][i],i));
		}
		if(!server[gcode]){
			gsname.options.add(new Option("<?php echo $this->_tpl_vars['systemLang']['choose']; ?>
",""));
			return false;
		}
}
function makeexcel(){
    if(confirm('<?php echo $this->_tpl_vars['systemLang']['exportTable']; ?>
')){
    $("#excel").val(1);
    submitform('<?php echo @BASEURI; ?>
members/index',false);
    }
}
</script>
<table border="0" class="search" cellspacing="0" id="search">
	<tr>
	<td>&nbsp;</td>
	<td>
	<input type="radio" value="1" name="s[type]" <?php if ($this->_tpl_vars['search']['type'] == 1): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['systemLang']['orderNumber']; ?>
&nbsp;&nbsp;<input type="radio" value="0" name="s[type]" <?php if ($this->_tpl_vars['search']['type'] == 0): ?>checked<?php endif; ?>> <?php echo $this->_tpl_vars['systemLang']['account']; ?>
&nbsp;&nbsp;<input type="text" name="s[mail]" value="<?php echo $this->_tpl_vars['search']['mail']; ?>
">
	 <input type="button" class="button" name="ng" onclick="submitform('<?php echo @BASEURI; ?>
members/index',false)" value="<?php echo $this->_tpl_vars['systemLang']['select']; ?>
" />
	</td>
	</tr>
	    <tr>
    	<td>&nbsp;</td>
     	<td>
            <?php echo $this->_tpl_vars['systemLang']['chooseApp']; ?>
:
            <select name="s[game_id]" onchange="gameChange(this.value)">
                <option value=''><?php echo $this->_tpl_vars['systemLang']['choose']; ?>
</option>
                <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['games'],'selected' => $this->_tpl_vars['search']['game_id']), $this);?>

            </select>
           <?php echo $this->_tpl_vars['systemLang']['service']; ?>
:
                <select id="server" name="s[server_id]" >
                    <option value=""><?php echo $this->_tpl_vars['systemLang']['choose']; ?>
</option>
                </select>
          <?php echo $this->_tpl_vars['systemLang']['spreadChannel']; ?>
:
            <select id="user_channel" name="s[source]" >
                <option value=""><?php echo $this->_tpl_vars['systemLang']['choose']; ?>
</option>
                <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['source'],'selected' => $this->_tpl_vars['search']['source']), $this);?>

            </select>
            <?php echo $this->_tpl_vars['systemLang']['registerSource']; ?>
：
            <select id="source" name="s[source_id]" >
            	<option value=""><?php echo $this->_tpl_vars['systemLang']['choose']; ?>
</option>
                <?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['source_ids'],'selected' => $this->_tpl_vars['search']['source_id']), $this);?>

            </select>
        </td>
    </tr>
   	<tr>
    	<td class="searchlogo">&nbsp;</td>
		<td><?php echo $this->_tpl_vars['systemLang']['userRange']; ?>
:
			<input type="radio" name="s[user_type]" value="" <?php if ($this->_tpl_vars['search']['user_type'] === '' || $this->_tpl_vars['search']['user_type'] === NULL): ?>checked<?php endif; ?> /><?php echo $this->_tpl_vars['systemLang']['install']; ?>
&nbsp;&nbsp;
			<input type="radio" name="s[user_type]" value="1" <?php if ($this->_tpl_vars['search']['user_type'] === '1'): ?>checked<?php endif; ?> /><?php echo $this->_tpl_vars['systemLang']['login']; ?>
&nbsp;&nbsp;
			<input type="radio" name="s[user_type]" value="0" <?php if ($this->_tpl_vars['search']['user_type'] === '0'): ?>checked<?php endif; ?> /><?php echo $this->_tpl_vars['systemLang']['unLogin']; ?>

        </td>
    </tr>
    <tr>
		<td>&nbsp;</td>
    	<td>
        <?php echo $this->_tpl_vars['systemLang']['registerTime']; ?>
:<input class="text" style="width:120px" type="text" name="s[add_stime]" id="add_date_s" readonly value="<?php echo $this->_tpl_vars['search']['add_stime']; ?>
"/>
     	- <input class="text" style="width:120px" type="text" name="s[add_etime]" id="add_date_e" readonly value="<?php echo $this->_tpl_vars['search']['add_etime']; ?>
"/>
        <input type="hidden" name="excel" id="excel" value="" />
        <input type="button" class="button" name="ng" onclick="submitform('<?php echo @BASEURI; ?>
members/index',false)" value="<?php echo $this->_tpl_vars['systemLang']['sure']; ?>
" />
        &nbsp;&nbsp;<a href="/members/index"><?php echo $this->_tpl_vars['systemLang']['clearSearch']; ?>
</a>
     	</td>
    </tr>
</table>
<table width="100%" border="0" class="adminlist" cellspacing="0">

  <thead>
  <tr>
    <th width="10%"><?php echo $this->_tpl_vars['systemLang']['vipMember']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['nickName']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['app']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['service']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['spreadChannel']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['registerSource']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['registerTime']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['lastTime']; ?>
</th>
    <th><?php echo $this->_tpl_vars['systemLang']['rechargeAmount']; ?>
</th>
	<th><?php echo $this->_tpl_vars['systemLang']['operate']; ?>
</th>
  </tr>
  </thead>
  <tbody>
  <?php $_from = $this->_tpl_vars['members']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['row']):
?>
  <tr class="row0">
   	<td><?php echo $this->_tpl_vars['row']['mail']; ?>
&nbsp;</td>
   	<td><?php echo $this->_tpl_vars['row']['user_name']; ?>
&nbsp;</td>
   	<td><?php echo $this->_tpl_vars['games'][$this->_tpl_vars['row']['game_id']]; ?>
&nbsp;</td>
   	<td><?php echo $this->_tpl_vars['server_list'][$this->_tpl_vars['row']['game_id']]; ?>
&nbsp;</td>
    <td><?php if ($this->_tpl_vars['row']['source'] == 0):  echo $this->_tpl_vars['systemLang']['nationChannel'];  else:  echo $this->_tpl_vars['source'][$this->_tpl_vars['row']['source']];  endif; ?></td>
    <td><?php echo $this->_tpl_vars['source_ids'][$this->_tpl_vars['row']['source_id']]; ?>
</td>
    <td><?php echo ((is_array($_tmp=$this->_tpl_vars['row']['create_time'])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M:%S")); ?>
&nbsp;</td>
    <td><?php echo ((is_array($_tmp=$this->_tpl_vars['user_login'][$this->_tpl_vars['row']['user_id']])) ? $this->_run_mod_handler('date_format', true, $_tmp, "%Y-%m-%d %H:%M:%S") : smarty_modifier_date_format($_tmp, "%Y-%m-%d %H:%M:%S")); ?>
&nbsp;</td>
	<td><?php echo $this->_tpl_vars['order_amount'][$this->_tpl_vars['row']['user_id']]; ?>
&nbsp;</td>
	<td><?php if ($_SESSION['adminmanager']['group_id'] == 10): ?>
		<a href="<?php echo @BASEURI; ?>
members/delete/<?php echo $this->_tpl_vars['row']['user_id']; ?>
"  onclick="return confirm('<?php echo $this->_tpl_vars['systemLang']['confirmDel']; ?>
')"><?php echo $this->_tpl_vars['systemLang']['del']; ?>
</a>
		<?php endif; ?> &nbsp;
	</td>
  </tr>
 <?php endforeach; endif; unset($_from); ?>
  <tr><td colspan="10">&nbsp;</td></tr>
  <tr>
	<td><?php echo $this->_tpl_vars['systemLang']['member']; ?>
: <?php echo $this->_tpl_vars['amount']['user_num']; ?>
</td>
	<td>&nbsp;</td>
    <td><?php echo $this->_tpl_vars['systemLang']['rechargeUser']; ?>
: <?php echo $this->_tpl_vars['amount']['pay_num']; ?>
</td>
	<td>&nbsp;</td>
	<td><?php echo $this->_tpl_vars['systemLang']['recharge']; ?>
: <?php echo $this->_tpl_vars['amount']['sum']; ?>
</td>
	<td>&nbsp;</td>
	<td>ARPU: <?php echo $this->_tpl_vars['amount']['avg']; ?>
</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
	<td>&nbsp;</td>
  </tr>
  </tbody>
  <tfoot>
      <tr>
        <td><input type="button" class="button" onclick="makeexcel()" value="<?php echo $this->_tpl_vars['systemLang']['export']; ?>
" />&nbsp;</td>
        <td colspan="8" style="text-align:center"><?php echo $this->_tpl_vars['page']; ?>
</td>
      </tr>
  </tfoot>
</table>
</form>
<script language="javascript">
	$('#add_date_s').datetimepicker({dateFormat:"yy-mm-dd hh:ii:00",timeFormat:""});
	$('#add_date_e').datetimepicker({dateFormat:"yy-mm-dd hh:ii:59",timeFormat:""});
	$('#logon_date_s').datetimepicker({dateFormat:"yy-mm-dd hh:ii:00",timeFormat:""});
	$('#logon_date_e').datetimepicker({dateFormat:"yy-mm-dd hh:ii:59",timeFormat:""});
    $('#pay_first_stime').datetimepicker({dateFormat:"yy-mm-dd 00:00:00",timeFormat:""});
	$('#pay_first_etime').datetimepicker({dateFormat:"yy-mm-dd 23:59:59",timeFormat:""});
    $('#pay_last_stime').datetimepicker({dateFormat:"yy-mm-dd 00:00:00",timeFormat:""});
	$('#pay_last_etime').datetimepicker({dateFormat:"yy-mm-dd 23:59:59",timeFormat:""});
</script>